/*
 * XML Type:  Transfer
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.Transfer
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML Transfer(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class TransferImpl extends net.ofx.types.x2003.x04.impl.AbstractInvestmentTransactionImpl implements net.ofx.types.x2003.x04.Transfer
{
    
    public TransferImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SECID$0 = 
        new javax.xml.namespace.QName("", "SECID");
    private static final javax.xml.namespace.QName SUBACCTSEC$2 = 
        new javax.xml.namespace.QName("", "SUBACCTSEC");
    private static final javax.xml.namespace.QName UNITS$4 = 
        new javax.xml.namespace.QName("", "UNITS");
    private static final javax.xml.namespace.QName TFERACTION$6 = 
        new javax.xml.namespace.QName("", "TFERACTION");
    private static final javax.xml.namespace.QName POSTYPE$8 = 
        new javax.xml.namespace.QName("", "POSTYPE");
    private static final javax.xml.namespace.QName INVACCTFROM$10 = 
        new javax.xml.namespace.QName("", "INVACCTFROM");
    private static final javax.xml.namespace.QName AVGCOSTBASIS$12 = 
        new javax.xml.namespace.QName("", "AVGCOSTBASIS");
    private static final javax.xml.namespace.QName UNITPRICE$14 = 
        new javax.xml.namespace.QName("", "UNITPRICE");
    private static final javax.xml.namespace.QName DTPURCHASE$16 = 
        new javax.xml.namespace.QName("", "DTPURCHASE");
    private static final javax.xml.namespace.QName INV401KSOURCE$18 = 
        new javax.xml.namespace.QName("", "INV401KSOURCE");
    
    
    /**
     * Gets the "SECID" element
     */
    public net.ofx.types.x2003.x04.SecurityId getSECID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SecurityId target = null;
            target = (net.ofx.types.x2003.x04.SecurityId)get_store().find_element_user(SECID$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "SECID" element
     */
    public void setSECID(net.ofx.types.x2003.x04.SecurityId secid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SecurityId target = null;
            target = (net.ofx.types.x2003.x04.SecurityId)get_store().find_element_user(SECID$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.SecurityId)get_store().add_element_user(SECID$0);
            }
            target.set(secid);
        }
    }
    
    /**
     * Appends and returns a new empty "SECID" element
     */
    public net.ofx.types.x2003.x04.SecurityId addNewSECID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SecurityId target = null;
            target = (net.ofx.types.x2003.x04.SecurityId)get_store().add_element_user(SECID$0);
            return target;
        }
    }
    
    /**
     * Gets the "SUBACCTSEC" element
     */
    public net.ofx.types.x2003.x04.SubAccountEnum.Enum getSUBACCTSEC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SUBACCTSEC$2, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.SubAccountEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "SUBACCTSEC" element
     */
    public net.ofx.types.x2003.x04.SubAccountEnum xgetSUBACCTSEC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SubAccountEnum target = null;
            target = (net.ofx.types.x2003.x04.SubAccountEnum)get_store().find_element_user(SUBACCTSEC$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "SUBACCTSEC" element
     */
    public void setSUBACCTSEC(net.ofx.types.x2003.x04.SubAccountEnum.Enum subacctsec)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SUBACCTSEC$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SUBACCTSEC$2);
            }
            target.setEnumValue(subacctsec);
        }
    }
    
    /**
     * Sets (as xml) the "SUBACCTSEC" element
     */
    public void xsetSUBACCTSEC(net.ofx.types.x2003.x04.SubAccountEnum subacctsec)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SubAccountEnum target = null;
            target = (net.ofx.types.x2003.x04.SubAccountEnum)get_store().find_element_user(SUBACCTSEC$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.SubAccountEnum)get_store().add_element_user(SUBACCTSEC$2);
            }
            target.set(subacctsec);
        }
    }
    
    /**
     * Gets the "UNITS" element
     */
    public java.lang.String getUNITS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITS$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "UNITS" element
     */
    public net.ofx.types.x2003.x04.QuantityType xgetUNITS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.QuantityType target = null;
            target = (net.ofx.types.x2003.x04.QuantityType)get_store().find_element_user(UNITS$4, 0);
            return target;
        }
    }
    
    /**
     * Sets the "UNITS" element
     */
    public void setUNITS(java.lang.String units)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITS$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNITS$4);
            }
            target.setStringValue(units);
        }
    }
    
    /**
     * Sets (as xml) the "UNITS" element
     */
    public void xsetUNITS(net.ofx.types.x2003.x04.QuantityType units)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.QuantityType target = null;
            target = (net.ofx.types.x2003.x04.QuantityType)get_store().find_element_user(UNITS$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.QuantityType)get_store().add_element_user(UNITS$4);
            }
            target.set(units);
        }
    }
    
    /**
     * Gets the "TFERACTION" element
     */
    public net.ofx.types.x2003.x04.InOutEnum.Enum getTFERACTION()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TFERACTION$6, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.InOutEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "TFERACTION" element
     */
    public net.ofx.types.x2003.x04.InOutEnum xgetTFERACTION()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InOutEnum target = null;
            target = (net.ofx.types.x2003.x04.InOutEnum)get_store().find_element_user(TFERACTION$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "TFERACTION" element
     */
    public void setTFERACTION(net.ofx.types.x2003.x04.InOutEnum.Enum tferaction)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TFERACTION$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TFERACTION$6);
            }
            target.setEnumValue(tferaction);
        }
    }
    
    /**
     * Sets (as xml) the "TFERACTION" element
     */
    public void xsetTFERACTION(net.ofx.types.x2003.x04.InOutEnum tferaction)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InOutEnum target = null;
            target = (net.ofx.types.x2003.x04.InOutEnum)get_store().find_element_user(TFERACTION$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.InOutEnum)get_store().add_element_user(TFERACTION$6);
            }
            target.set(tferaction);
        }
    }
    
    /**
     * Gets the "POSTYPE" element
     */
    public net.ofx.types.x2003.x04.PositionTypeEnum.Enum getPOSTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(POSTYPE$8, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.PositionTypeEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "POSTYPE" element
     */
    public net.ofx.types.x2003.x04.PositionTypeEnum xgetPOSTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PositionTypeEnum target = null;
            target = (net.ofx.types.x2003.x04.PositionTypeEnum)get_store().find_element_user(POSTYPE$8, 0);
            return target;
        }
    }
    
    /**
     * Sets the "POSTYPE" element
     */
    public void setPOSTYPE(net.ofx.types.x2003.x04.PositionTypeEnum.Enum postype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(POSTYPE$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(POSTYPE$8);
            }
            target.setEnumValue(postype);
        }
    }
    
    /**
     * Sets (as xml) the "POSTYPE" element
     */
    public void xsetPOSTYPE(net.ofx.types.x2003.x04.PositionTypeEnum postype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PositionTypeEnum target = null;
            target = (net.ofx.types.x2003.x04.PositionTypeEnum)get_store().find_element_user(POSTYPE$8, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PositionTypeEnum)get_store().add_element_user(POSTYPE$8);
            }
            target.set(postype);
        }
    }
    
    /**
     * Gets the "INVACCTFROM" element
     */
    public net.ofx.types.x2003.x04.InvestmentAccount getINVACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccount target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccount)get_store().find_element_user(INVACCTFROM$10, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "INVACCTFROM" element
     */
    public boolean isSetINVACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVACCTFROM$10) != 0;
        }
    }
    
    /**
     * Sets the "INVACCTFROM" element
     */
    public void setINVACCTFROM(net.ofx.types.x2003.x04.InvestmentAccount invacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccount target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccount)get_store().find_element_user(INVACCTFROM$10, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.InvestmentAccount)get_store().add_element_user(INVACCTFROM$10);
            }
            target.set(invacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "INVACCTFROM" element
     */
    public net.ofx.types.x2003.x04.InvestmentAccount addNewINVACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccount target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccount)get_store().add_element_user(INVACCTFROM$10);
            return target;
        }
    }
    
    /**
     * Unsets the "INVACCTFROM" element
     */
    public void unsetINVACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVACCTFROM$10, 0);
        }
    }
    
    /**
     * Gets the "AVGCOSTBASIS" element
     */
    public java.lang.String getAVGCOSTBASIS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AVGCOSTBASIS$12, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "AVGCOSTBASIS" element
     */
    public net.ofx.types.x2003.x04.AmountType xgetAVGCOSTBASIS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(AVGCOSTBASIS$12, 0);
            return target;
        }
    }
    
    /**
     * True if has "AVGCOSTBASIS" element
     */
    public boolean isSetAVGCOSTBASIS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(AVGCOSTBASIS$12) != 0;
        }
    }
    
    /**
     * Sets the "AVGCOSTBASIS" element
     */
    public void setAVGCOSTBASIS(java.lang.String avgcostbasis)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AVGCOSTBASIS$12, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(AVGCOSTBASIS$12);
            }
            target.setStringValue(avgcostbasis);
        }
    }
    
    /**
     * Sets (as xml) the "AVGCOSTBASIS" element
     */
    public void xsetAVGCOSTBASIS(net.ofx.types.x2003.x04.AmountType avgcostbasis)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(AVGCOSTBASIS$12, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AmountType)get_store().add_element_user(AVGCOSTBASIS$12);
            }
            target.set(avgcostbasis);
        }
    }
    
    /**
     * Unsets the "AVGCOSTBASIS" element
     */
    public void unsetAVGCOSTBASIS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(AVGCOSTBASIS$12, 0);
        }
    }
    
    /**
     * Gets the "UNITPRICE" element
     */
    public java.lang.String getUNITPRICE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITPRICE$14, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "UNITPRICE" element
     */
    public net.ofx.types.x2003.x04.UnitPriceType xgetUNITPRICE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.UnitPriceType target = null;
            target = (net.ofx.types.x2003.x04.UnitPriceType)get_store().find_element_user(UNITPRICE$14, 0);
            return target;
        }
    }
    
    /**
     * True if has "UNITPRICE" element
     */
    public boolean isSetUNITPRICE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(UNITPRICE$14) != 0;
        }
    }
    
    /**
     * Sets the "UNITPRICE" element
     */
    public void setUNITPRICE(java.lang.String unitprice)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITPRICE$14, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNITPRICE$14);
            }
            target.setStringValue(unitprice);
        }
    }
    
    /**
     * Sets (as xml) the "UNITPRICE" element
     */
    public void xsetUNITPRICE(net.ofx.types.x2003.x04.UnitPriceType unitprice)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.UnitPriceType target = null;
            target = (net.ofx.types.x2003.x04.UnitPriceType)get_store().find_element_user(UNITPRICE$14, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.UnitPriceType)get_store().add_element_user(UNITPRICE$14);
            }
            target.set(unitprice);
        }
    }
    
    /**
     * Unsets the "UNITPRICE" element
     */
    public void unsetUNITPRICE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(UNITPRICE$14, 0);
        }
    }
    
    /**
     * Gets the "DTPURCHASE" element
     */
    public java.lang.String getDTPURCHASE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTPURCHASE$16, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DTPURCHASE" element
     */
    public net.ofx.types.x2003.x04.DateTimeType xgetDTPURCHASE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTPURCHASE$16, 0);
            return target;
        }
    }
    
    /**
     * True if has "DTPURCHASE" element
     */
    public boolean isSetDTPURCHASE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DTPURCHASE$16) != 0;
        }
    }
    
    /**
     * Sets the "DTPURCHASE" element
     */
    public void setDTPURCHASE(java.lang.String dtpurchase)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTPURCHASE$16, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DTPURCHASE$16);
            }
            target.setStringValue(dtpurchase);
        }
    }
    
    /**
     * Sets (as xml) the "DTPURCHASE" element
     */
    public void xsetDTPURCHASE(net.ofx.types.x2003.x04.DateTimeType dtpurchase)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTPURCHASE$16, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.DateTimeType)get_store().add_element_user(DTPURCHASE$16);
            }
            target.set(dtpurchase);
        }
    }
    
    /**
     * Unsets the "DTPURCHASE" element
     */
    public void unsetDTPURCHASE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DTPURCHASE$16, 0);
        }
    }
    
    /**
     * Gets the "INV401KSOURCE" element
     */
    public net.ofx.types.x2003.x04.Investment401KSourceEnum.Enum getINV401KSOURCE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INV401KSOURCE$18, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.Investment401KSourceEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "INV401KSOURCE" element
     */
    public net.ofx.types.x2003.x04.Investment401KSourceEnum xgetINV401KSOURCE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Investment401KSourceEnum target = null;
            target = (net.ofx.types.x2003.x04.Investment401KSourceEnum)get_store().find_element_user(INV401KSOURCE$18, 0);
            return target;
        }
    }
    
    /**
     * True if has "INV401KSOURCE" element
     */
    public boolean isSetINV401KSOURCE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INV401KSOURCE$18) != 0;
        }
    }
    
    /**
     * Sets the "INV401KSOURCE" element
     */
    public void setINV401KSOURCE(net.ofx.types.x2003.x04.Investment401KSourceEnum.Enum inv401KSOURCE)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INV401KSOURCE$18, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INV401KSOURCE$18);
            }
            target.setEnumValue(inv401KSOURCE);
        }
    }
    
    /**
     * Sets (as xml) the "INV401KSOURCE" element
     */
    public void xsetINV401KSOURCE(net.ofx.types.x2003.x04.Investment401KSourceEnum inv401KSOURCE)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Investment401KSourceEnum target = null;
            target = (net.ofx.types.x2003.x04.Investment401KSourceEnum)get_store().find_element_user(INV401KSOURCE$18, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.Investment401KSourceEnum)get_store().add_element_user(INV401KSOURCE$18);
            }
            target.set(inv401KSOURCE);
        }
    }
    
    /**
     * Unsets the "INV401KSOURCE" element
     */
    public void unsetINV401KSOURCE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INV401KSOURCE$18, 0);
        }
    }
}
